Skip to content

Add secret + git-hygiene scanning (v1.1.0) - #2

Merged
sakebomb merged 1 commit into
mainfrom
release/v1.1.0
Aug 18, 2026
Merged

sakebomb merged 1 commit into
mainfrom
release/v1.1.0

Conversation

@sakebomb

Copy link
Copy Markdown
Owner

Summary

  • Expand leakguard from an identity/topology gate into a full secret + git-hygiene scanner, keeping it deterministic, zero-network, and zero-dependency (stdlib only).
  • New detectors.py: 30+ provider secret rules (ported from gitleaks), connection-string creds (incl. no-username redis://:pass@), and sensitive-filename detection — with a keyword pre-filter, allowlist layer, and placeholder denylist. Findings are masked (raw secret never printed).
  • New workflows: baseline (accept a repo's existing leaks, block only new ones; hashes only, --report triage), commit-msg gate, large-file tripwire, .gitignore completeness check, and entropy/generic key=value heuristics as non-blocking audit warnings.
  • .pre-commit-hooks.yaml for install via the pre-commit framework.

Test plan

  • pytest -q — 59 tests pass (was 14)
  • leakguard ci --base main self-scan clean on this PR
  • High-precision blocking verified: real GitHub/Stripe/Anthropic/postgres/redis creds block; .env.example, AWS EXAMPLE, pk_ publishable, placeholder values, public certs do not
  • Passed two independent empirical reviews (security + quality); 2 blocking findings fixed (unicode-path gate bypass, baseline staged-secret laundering)

Expand leakguard from an identity/topology gate into a full secret + git-hygiene
scanner while keeping it deterministic, zero-network, and zero-dependency.

- 30+ provider secret rules (ported from gitleaks) + connection-string creds +
  sensitive-filename detection, in a new detectors.py.
- entropy + generic key=value heuristics as non-blocking audit warnings.
- baseline workflow (.leakguard-baseline.json, hashes only) with `--report`
  triage; commit-msg gate; large-file tripwire; .gitignore completeness check.
- pre-commit framework support via .pre-commit-hooks.yaml.

High-precision blocking (keyword pre-filter + allowlists + placeholder denylist),
findings masked so a raw secret is never printed. Tests 14 -> 59.
@sakebomb
sakebomb merged commit d7ef3b1 into main Aug 18, 2026
2 checks passed
@sakebomb
sakebomb deleted the release/v1.1.0 branch August 18, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant